package Connector;

public enum HttpStatus {
    // TODO enum的使用

    SC_OK(200, "OK"),
    SC_NOT_FOUND(404, "File Not Found");

    // 应该先定义成员变量和构造方法，再写枚举
    private int statusCode;
    private String reason;

    HttpStatus(int statusCode, String reason) {
        this.statusCode = statusCode;
        this.reason = reason;
    }

    public int getStatusCode() {
        return statusCode;
    }

    public String getReason() {
        return reason;
    }
}
